<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <style>
        div{
            width: 200px;
            height: 100px;
            background-color: blue;
        }

    </style>
    <div></div>
</body>
</html>
<script>
    var div=document.querySelector('div')
    div.onclick=function(){
        div.style.width='300px'
        div.style.height='300px';
        div.style.backgroundColor='green';
    }
</script>